//
//  MainViewController.h
//  FinalMes
//
//  Created by Roger Plana Casadellà on 07/07/11.
//  Copyright 2011 Champions Freak. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SynthesizeSingleton.h"
#import "ASIFormDataRequest.h"
#import "SBJson.h"
#import "DSActivityView.h"
#import <QuartzCore/QuartzCore.h>

#define BASE_URL @"http://www.nlabs.es/api/api.php"
//#define BASE_URL @"http://www.bananity.com:80/api/api.php"

#define APP_API_VERSION @"1.0"

#define FROM_NOTIFICATIONS 0
#define FROM_WHISHLIST 1
#define FROM_SEARCH_RESULTS 2
#define FROM_HOT 3
#define FROM_NONE 4

#define UIColorFromRGB(R,G,B) [UIColor \
    colorWithRed:((float)R)/255.0f \
    green:((float)G)/255.0f \
    blue:((float)B)/255.0f alpha:1.0f]

@class LoginViewController;
@class DashboardViewController;
@class MisListasViewController;

@interface MainViewController : UIViewController 
{
    //View Controllers
    LoginViewController *_loginView;
    DashboardViewController *_dashboardView;
    MisListasViewController *_misListasView;
    
    NSString *_hashID;
    NSString *_userName;
}

@property (nonatomic, retain) LoginViewController *loginView;
@property (nonatomic, retain) DashboardViewController *dashboardView;
@property (nonatomic, retain) MisListasViewController *misListasView;

@property (nonatomic, retain) NSString *hashID;
@property (nonatomic, retain) NSString *userName;

/*Load Views Methods*/
- (void)LoadLogin:(UIViewController *)vista;
- (void)LoadDashboard:(UIViewController *)vista;
- (void)LoadMisListas:(UIViewController *)vista;

-(void)resetAll;

/* Singleton */
+ (MainViewController *)sharedMainViewController;

@end